package com.atguigu.controller;

import com.atguigu.common.result.R;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/hosp")
//@CrossOrigin //跨域
public class UserloginContoller {
   @PostMapping("/user/login")
    public R login(){
        return  R.ok().data("token","admin");
    }
     @RequestMapping("user/info")
    public R info(){
        return  R.ok().data("role","admin");
    }

}
